package com.bean;

import com.imessage.type.BusinessTaskCmd;
import com.imessage.type.BusinessTaskState;
import com.imessage.type.DeviceVirtualState;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

@Getter
@Setter
@ToString
@Entity
@Table(name = "device_virtual", schema = "public")
public class DeviceVirtual extends BaseModel implements Serializable {

    @ManyToOne
    @JoinColumn(name = "device_client_id")
    private DeviceClient DeviceClient;

    @Column(name = "virtual_name", nullable = true, length = 255)
    private String virtualName;

    @Column(name = "virtual_mac", nullable = true, length = 255)
    private String virtualMac;

    @Column(name = "task_cmd", nullable = true, length = 2)
    private BusinessTaskCmd taskCmd = BusinessTaskCmd.other;

    @Column(name = "task_state", nullable = true, length = 2)
    private BusinessTaskState taskState = BusinessTaskState.init;

    @Column(name = "state", nullable = true, length = 2)
    private DeviceVirtualState state = DeviceVirtualState.shutdown;

}
